package com.bltec.emergency.service.statisticsService.impl;

import com.bltec.emergency.mapper.ResponseStatisticsMapper;
import com.bltec.emergency.model.ResponseStatistics;
import com.bltec.emergency.service.statisticsService.ResponseStatisticsService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
public class ResponseStatisticsServiceImpl implements ResponseStatisticsService {
    @Resource
    private ResponseStatisticsMapper responseStatisticsMapper;
    @Override
    public boolean add(ResponseStatistics responseStatistics) {
        return responseStatisticsMapper.insert(responseStatistics);
    }

    @Override
    public boolean deleteResponseStatisticsById(Long id) {
        return responseStatisticsMapper.setDisableById(id);
    }

    @Override
    public boolean updateResponseStatisticsById(ResponseStatistics responseStatistics) {
        return responseStatisticsMapper.updateResponseStatisticsById(responseStatistics);
    }

    @Override
    public ResponseStatistics getResponseStatisticsById(Long id) {
        return responseStatisticsMapper.getResponseStatisticsById(id);
    }

    @Override
    public List<ResponseStatistics> getAll() {
        return responseStatisticsMapper.selectAll();
    }
}
